<template>
  <el-container class="home-container">
    <el-header>
      <router-link style="text-decoration: none;" to="/home">
        <div class="logo_tile">
          <h2>运营商商家管理系统</h2>
        </div>
      </router-link>
      <div class="logo_tile">
        <span> 欢迎：<i class="el-icon-arrow-left"></i>七组<i class="el-icon-arrow-right"></i> </span>
        <el-button @click="" type="info">退出</el-button>
      </div>
    </el-header>
    <el-container>
      <el-aside :width="isCollapse ? '65px' : '200px'">
        <div class="toggleBar" @click="isCollapse=!isCollapse">|||</div>
        <el-menu
          class="el-menu-vertical-demo"
          background-color="#333744"
          text-color="#fff"
          router
          unique-opened
          :collapse="isCollapse"
          :collapse-transition="false"
          active-text-color="#409EFF">

          <el-submenu  index="cv1" :class="{'el_submenu_large':!isCollapse,'el_submenu_small':isCollapse}" >
            <template slot="title">
              <i class="el-icon-edit"></i>
              <span slot="title">运营商管理</span>
            </template>
            <el-menu-item index="Login">运营商登录</el-menu-item>
            <el-menu-item index="AdminList">运营商信息</el-menu-item>
            <el-menu-item index="AddAdmin">运营商添加</el-menu-item>
            <el-menu-item index="UpdateAdmin">运营商更新</el-menu-item>
          </el-submenu>
        </el-menu>
        <el-menu
          class="el-menu-vertical-demo"
          background-color="#333744"
          text-color="#fff"
          router
          unique-opened
          :collapse="isCollapse"
          :collapse-transition="false"
          active-text-color="#409EFF">

          <el-submenu  index="cv1" :class="{'el_submenu_large':!isCollapse,'el_submenu_small':isCollapse}" >
            <template slot="title">
              <i class="el-icon-edit"></i>
              <span slot="title">商家管理</span>
            </template>
            <el-menu-item index="SellerLIst">商家信息</el-menu-item>
            <el-menu-item index="Login">商家审核/启用/禁用</el-menu-item>
          </el-submenu>
        </el-menu>
        <el-menu
          class="el-menu-vertical-demo"
          background-color="#333744"
          text-color="#fff"
          router
          unique-opened
          :collapse="isCollapse"
          :collapse-transition="false"
          active-text-color="#409EFF">

          <el-submenu  index="cv1" :class="{'el_submenu_large':!isCollapse,'el_submenu_small':isCollapse}" >
            <template slot="title">
              <i class="el-icon-edit"></i>
              <span slot="title">基础信息管理</span>
            </template>
            <el-menu-item index="Login">分类管理</el-menu-item>
            <el-menu-item index="BrandList">品牌管理</el-menu-item>
            <el-menu-item index="SpecificationList">规格管理</el-menu-item>
            <el-menu-item index="Login">模板管理</el-menu-item>
          </el-submenu>
        </el-menu>
        <el-menu
          class="el-menu-vertical-demo"
          background-color="#333744"
          text-color="#fff"
          router
          unique-opened
          :collapse="isCollapse"
          :collapse-transition="false"
          active-text-color="#409EFF">
          <el-submenu  index="cv1" :class="{'el_submenu_large':!isCollapse,'el_submenu_small':isCollapse}" >
            <template slot="title">
              <i class="el-icon-edit"></i>
              <span slot="title">商品管理</span>
            </template>
            <el-menu-item index="Login">商品信息</el-menu-item>
            <el-menu-item index="Login">商品审核</el-menu-item>
          </el-submenu>
        </el-menu>
        <el-menu
          class="el-menu-vertical-demo"
          background-color="#333744"
          text-color="#fff"
          router
          unique-opened
          :collapse="isCollapse"
          :collapse-transition="false"
          active-text-color="#409EFF">
          <el-submenu  index="cv1" :class="{'el_submenu_large':!isCollapse,'el_submenu_small':isCollapse}" >
            <template slot="title">
              <i class="el-icon-edit"></i>
              <span slot="title">广告管理</span>
            </template>
            <el-menu-item index="Login">广告类型</el-menu-item>
            <el-menu-item index="Login">广告信息</el-menu-item>
            <el-menu-item index="Login">广告启用/禁用</el-menu-item>
          </el-submenu>
        </el-menu>
        <el-menu
          class="el-menu-vertical-demo"
          background-color="#333744"
          text-color="#fff"
          router
          unique-opened
          :collapse="isCollapse"
          :collapse-transition="false"
          active-text-color="#409EFF">
          <el-submenu  index="cv1" :class="{'el_submenu_large':!isCollapse,'el_submenu_small':isCollapse}" >
            <template slot="title">
              <i class="el-icon-edit"></i>
              <span slot="title">商家管理</span>
            </template>
            <el-menu-item index="Login">申请入住</el-menu-item>
            <el-menu-item index="Login">基本信息更新</el-menu-item>
            <el-menu-item index="Login">商家登录</el-menu-item>
          </el-submenu>
        </el-menu>
        <el-menu
          class="el-menu-vertical-demo"
          background-color="#333744"
          text-color="#fff"
          router
          unique-opened
          :collapse="isCollapse"
          :collapse-transition="false"
          active-text-color="#409EFF">
          <el-submenu  index="cv1" :class="{'el_submenu_large':!isCollapse,'el_submenu_small':isCollapse}" >
            <template slot="title">
              <i class="el-icon-edit"></i>
              <span slot="title">商品管理</span>
            </template>
            <el-menu-item index="Login">商品信息</el-menu-item>
            <el-menu-item index="Login">更新商品</el-menu-item>
            <el-menu-item index="Login">商品提交</el-menu-item>
            <el-menu-item index="Login">商品上架</el-menu-item>
          </el-submenu>
          <el-submenu  index="cv1" :class="{'el_submenu_large':!isCollapse,'el_submenu_small':isCollapse}" >
            <template slot="title">
              <i class="el-icon-edit"></i>
              <span slot="title">订单管理</span>
            </template>
            <el-menu-item index="Login">订单信息</el-menu-item>
            <el-menu-item index="Login">订单发货</el-menu-item>
            <el-menu-item index="Login">订单关闭</el-menu-item>
          </el-submenu>
        </el-menu>
      </el-aside>
      <!-- 右侧的 主体区域 -->
      <el-main>
        <router-view></router-view>
      </el-main>
    </el-container>
    <span style="color: gray; position: fixed; bottom: 0; right: 0;">用户管理系统</span>
  </el-container>

</template>

<script>
export default {
  name: 'Home',
  data(){
    return{
      isCollapse:false
    }
  }
}
</script>

<style lang="less" scoped>

.home-container {
  height: 100%;
}

.el-header {
  background-color: #373d41;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  user-select: none;

  .logo_tile {
    display: flex;
    align-items: center;
    color: white;

    h2 {
      font-weight: 200;
      margin-left: 15px;
    }
  }

  .el-button {
    margin-right: 10px;
  }
}

.el-aside {
  background-color: #333744;
  user-select: none;
}

.el-main {
  background-color: #eaedf1;
}

.iconfont {
  margin-right: 8px;
}

.toggleBar {
  color: #fff;
  font-size: 12px;
  line-height: 24px;
  background-color: #4a5064;
  text-align: center;
  letter-spacing: 0.2em;
  cursor: pointer;
  user-select: none;
}

.el_submenu_large {
  width: 200px;
}

.el_submenu_small {
  width: 65px;
}
</style>
